<!--  -->
<template>
  <div>
    <el-table :data="test" style="width: 100%">
      <el-table-column prop="title" label="标题" width="180"> </el-table-column>
      <el-table-column prop="img" label="图片" width="180"> </el-table-column>
      <el-table-column prop="md_text" label="md"> </el-table-column>
      <el-table-column prop="html_text" label="html"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
        test:[]
    };
  },
  methods:{
      getTest(){
        axios.get("http://127.0.0.1:7001/api/blog/1").then(res =>{
            console.log(res.data.data);
            this.test = res.data.data
            
        })
      }
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {
      this.getTest()
  },
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>